Example1 Company Intranet

This example shows how to index a site containing various documents located on the web server and file-system. This demonstrates usage when a web-site has document folders without HTML links to each document.


We will;
1. Import ASPX and HTML pages from the web server
2. Import PDF and Word documents stored on the file-system
3. Configure the Windows Service to update the index once a week
4. Deploy new documents

1. Import pages from web server

From the page containing the SearchResult control (Example1_CompanyIntranet/SearchResults.aspx in our example), access the Index Management Tool and select Import New Source.

To begin importing enter the start URL for the site and click Import. In this example;
http://localhost:49094/Company_Intranet/IntranetDemoSite/Notices.aspx

The spider will then proceed to read the site and add new links. Once complete you can see these links from the Indexed Sources form.

2. Import documents from file-system

In our demo site we have a folder that contains documents we want indexed for searching but are not linked to from any pages on the site (IntranetDemoSite/Policies/). The easiest way to add these to the index is to use a file-system import.

From the Import section of the Index Management Tool, select FileSystemDocumentStore from the Type of Source drop down list.

Enter the Local Folder Path, in this example;
..\..\IntranetDemoSite\Policies\ which contains the documents on the file-system required to be indexed for searching. The local folder path can be relative to the index directory.

Next enter the Virtual Folder Path, in this example;
http://localhost:49094/Company_Intranet/IntranetDemoSite/Policies/ any documents found under the local folder path are automatically mapped to the Virtual Folder path.

Before Importing we need to set the document types to be included in the Import. Click More Options and under Target Match List add the document types, in this example '.doc' and '.pdf'. Only these document types will be Imported.

Note: To specify strings that must match at the end of the filename, use a $ character, eg. ".aspx$" will match "default.aspx" but not "default.aspx.cs".

Additionally these options can also be set;
No recurse folder match list - is a list of strings that specify which subfolders will not be looked inside.
Recurse sub-folders - specifies whether to look in subdirectories as well.

Click Import to add the documents to the index. Once complete you can see these links from the Indexed Sources form

3. Configure the Windows Service

In our example we want to update the index with any new documents, automatically, once each week. This is achieved by using the Windows Service. For details on installing the Windows Service please see the Administration App. & Windows Service section of the Help Help documentation.

The configuration.xml file under the Index Directory needs to be setup with the details required by the Windows Service. To edit the configuration, from the SearchResult control select Manage Index to open the Index Management Tool and select the Windows Service form from the menu.

The following settings should be configured;

ServiceRebuildFrequency - how many hours should pass since the last indexing operation. In this example it is set to 168. (24hrs x 7 days).

ServiceRebuildHour - the hour of the day at which the first indexing operation will happen. In this example it is set to 13. The first indexing operation will therefore start at 1:00pm.

ServiceWillOptimizeIndex - whether the Windows Service will optimize the index after it has reimported sources.

Click Save Changes. After any changes are made to the Windows Service settings you must restart the service for any changes to take effect. This can be done from the Windows Service section of the Index Management Tool or by loading the service (Control Panel > Administrative Tools > Services) open Keyoti_Search_Index_Service and restart.

4. Deploy new documents

New documents which have been added and are linked to by the site will be added during the next re-indexing operation.

File-system

Any new documents added to the local folder can be deployed by copying them to the Virtual Folder. The new documents will be added during the next re-indexing operation.

Introduction